cmake_minimum_required(VERSION 3.23)
project(matrix)

set(CMAKE_CXX_STANDARD 14)

include_directories(.)


add_executable(matrix main.cpp matrix.h matrix.cpp)

find_package(Threads REQUIRED)
target_link_libraries(matrix PUBLIC Threads::Threads)


option(ENABLE_NATIVE_BUILD_OPTIMIZATIONS "Enable native build optimization flags" ON)

if (ENABLE_NATIVE_BUILD_OPTIMIZATIONS)
    target_compile_options(${PROJECT_NAME} PUBLIC -O3 -march=native -mtune=native)
else ()
    target_compile_options(${PROJECT_NAME} PUBLIC -O3)
endif ()
